import 'package:flutter_demo/ui/pages/search/mudule/answer_item.dart';

class QuerySearchPageVO {
  String? totalPage;
  String? pageNo;
  String? isVip;
  String? keyWord;
  List<AnswerItem>? answerList;

  QuerySearchPageVO(
      {this.totalPage, this.pageNo, this.isVip, this.keyWord, this.answerList});

  QuerySearchPageVO.fromJson(Map<String, dynamic> json) {
    totalPage = json['totalPage'];
    pageNo = json['pageNo'];
    isVip = json['isVip'];
    keyWord = json['keyWord'];
    if (json['answerList'] != null) {
      answerList = <AnswerItem>[];
      json['answerList'].forEach((v) {
        answerList!.add(new AnswerItem.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['totalPage'] = this.totalPage;
    data['pageNo'] = this.pageNo;
    data['isVip'] = this.isVip;
    data['keyWord'] = this.keyWord;
    if (this.answerList != null) {
      data['answerList'] = this.answerList!.map((v) => v.toJson()).toList();
    }
    return data;
  }
}
